package com.polaris.live.dialog

import android.content.Context
import androidx.recyclerview.widget.LinearLayoutManager
import com.lxj.xpopup.core.CenterPopupView
import com.polaris.live.R
import com.polaris.live.adapter.chatPrice.BeansInstructionAdapter
import com.polaris.live.databinding.DialogTargetAnchorBinding
import com.polaris.live.resp.back_resp.InstructionVo

/**
 * TargetAnchorDialog
 *
 * @author Created by 半仙 on 2024/1/11/011 17:40
 */
class TargetAnchorDialog(
    context: Context,
    private val mRatingInstruction: List<InstructionVo>,
) : CenterPopupView(context) {
    private lateinit var mBinding: DialogTargetAnchorBinding

    private val mAdapter by lazy { BeansInstructionAdapter() }

    override fun getImplLayoutId(): Int {
        return R.layout.dialog_target_anchor
    }

    override fun onCreate() {
        super.onCreate()
        mBinding = DialogTargetAnchorBinding.bind(popupImplView)
        mBinding.coinRecycler.layoutManager = LinearLayoutManager(context)
        mBinding.coinRecycler.adapter = mAdapter
        mAdapter.setList(mRatingInstruction)
    }
}